Analysis date: 2023-08-08

Depends on

CRC_Xenografts_Batch2_DataProcessing Script

load("../Data/Cache/Xenografts_Batch2_DataProcessing.RData")

TODO

Setup

Load libraries and functions

Analysis

DEP

Serine/Threonine all

Each condition vs ctrl

data_diff_ctrl_vs_E_pST <- test_diff(pST_se_Set2, type="manual", test = "E_vs_ctrl")
## Tested contrasts: E_vs_ctrl
dep_ctrl_vs_E_pST <- add_rejections_SH(data_diff_ctrl_vs_E_pST, alpha = 0.05, lfc = log2(1.2))
GGPlotly_Volcano(dep_ctrl_vs_E_pST, contrast = "E_vs_ctrl", 
                 add_names = TRUE,
                additional_title = "pST") 
Return_DEP_Hits_Plots(data = pST_Set2_form, dep_ctrl_vs_E_pST, comparison = "E_vs_ctrl_diff")
## 'select()' returned 1:1 mapping between keys and columns
## Loading required namespace: reactome.db
## 'select()' returned 1:many mapping between keys and columns
## 'select()' returned 1:1 mapping between keys and columns

##                                                    pathway       pval      padj
## 1:                                  2-LTR circle formation 0.61271676 0.9922314
## 2:                               ABC transporter disorders 0.30165289 0.9534518
## 3:                  ABC-family proteins mediated transport 0.18901454 0.9534518
## 4: ADORA2B mediated anti-inflammatory cytokines production 0.01550755 0.7633058
## 5:               AKT phosphorylates targets in the cytosol 0.85488959 0.9922314
## 6:               AKT phosphorylates targets in the nucleus 0.36994220 0.9534518
##       log2err         ES        NES size         leadingEdge
## 1: 0.06689663  0.6847059  0.9213786    1               11168
## 2: 0.11056472 -0.8564706 -1.1474743    1                5684
## 3: 0.12563992 -0.7670509 -1.2121482    3                5684
## 4: 0.38073040  0.8537796  1.6499823    4 5577,5566,5576,5573
## 5: 0.07492788  0.3297872  0.6811472    5       2932,207,7249
## 6: 0.09374654  0.8058824  1.0844405    1                 207
data_diff_EC_vs_ctrl_pST <- test_diff(pST_se_Set2, type="manual", test = "EC_vs_ctrl")
## Tested contrasts: EC_vs_ctrl
dep_EC_vs_ctrl_pST <- add_rejections_SH(data_diff_EC_vs_ctrl_pST, alpha = 0.05, lfc = log2(1.2))
GGPlotly_Volcano(dep_EC_vs_ctrl_pST, contrast = "EC_vs_ctrl", 
                 add_names = TRUE,
                additional_title = "pST") 
Return_DEP_Hits_Plots(data = pST_Set2_form, dep_EC_vs_ctrl_pST, comparison = "EC_vs_ctrl_diff")
## 'select()' returned 1:1 mapping between keys and columns
## 'select()' returned 1:many mapping between keys and columns
## 'select()' returned 1:1 mapping between keys and columns

##                                                    pathway      pval      padj
## 1:                                  2-LTR circle formation 0.8571429 0.9912939
## 2:                               ABC transporter disorders 0.2118812 0.9485100
## 3:                  ABC-family proteins mediated transport 0.6333938 0.9620287
## 4: ADORA2B mediated anti-inflammatory cytokines production 0.1773050 0.9485100
## 5:               AKT phosphorylates targets in the cytosol 0.1428571 0.9485100
## 6:               AKT phosphorylates targets in the nucleus 0.5694165 0.9620287
##       log2err         ES        NES size         leadingEdge
## 1: 0.05302125  0.5741176  0.7536820    1               11168
## 2: 0.13214726 -0.8917647 -1.1988703    1                5684
## 3: 0.06238615 -0.5093616 -0.8776526    3                5684
## 4: 0.16080140  0.6926490  1.2883339    4 5577,5576,5566,5573
## 5: 0.18470647  0.6576765  1.3356214    5   572,2932,207,7249
## 6: 0.07271411  0.7258824  0.9529136    1                 207
Plot_Enrichment_Single_Pathway(dep_EC_vs_ctrl_pST, comparison = "EC_vs_ctrl_diff", 
                               pw = "Epigenetic regulation of gene expression")
data_diff_EBC_vs_ctrl_pST <- test_diff(pST_se_Set2, type="manual", test = "EBC_vs_ctrl")
## Tested contrasts: EBC_vs_ctrl
dep_EBC_vs_ctrl_pST <- add_rejections_SH(data_diff_EBC_vs_ctrl_pST, alpha = 0.05, lfc = log2(1.2))
GGPlotly_Volcano(dep_EBC_vs_ctrl_pST, contrast = "EBC_vs_ctrl", 
                 add_names = TRUE,
                additional_title = "pST")
Return_DEP_Hits_Plots(data = pST_Set2_form, dep_EBC_vs_ctrl_pST, comparison = "EBC_vs_ctrl_diff")
## 'select()' returned 1:1 mapping between keys and columns
## 'select()' returned 1:many mapping between keys and columns
## 'select()' returned 1:1 mapping between keys and columns

##                                                    pathway       pval      padj
## 1:                                  2-LTR circle formation 0.61706349 0.9232387
## 2:                               ABC transporter disorders 0.18473896 0.8333398
## 3:                  ABC-family proteins mediated transport 0.55968689 0.9232387
## 4: ADORA2B mediated anti-inflammatory cytokines production 0.04036795 0.8130633
## 5:               AKT phosphorylates targets in the cytosol 0.87850467 0.9764403
## 6:               AKT phosphorylates targets in the nucleus 0.74007937 0.9362964
##       log2err         ES        NES size             leadingEdge
## 1: 0.06799226  0.6894118  0.9166073    1                   11168
## 2: 0.14375899 -0.9211765 -1.2184080    1                    5684
## 3: 0.07217980 -0.5394246 -0.9459088    3                    5684
## 4: 0.32177592  0.7725547  1.4846815    4          5577,5576,5566
## 5: 0.04850598 -0.3215130 -0.6561460    5 572,84335,2932,207,7249
## 6: 0.05922192  0.6341176  0.8430910    1                     207

EC vs E

data_diff_EC_vs_E_pST <- test_diff(pST_se_Set2, type = "manual", 
                              test = c("EC_vs_E"))
## Tested contrasts: EC_vs_E
dep_EC_vs_E_pST <- add_rejections_SH(data_diff_EC_vs_E_pST, alpha = 0.05, lfc = log2(1.2))
GGPlotly_Volcano(dep_EC_vs_E_pST, contrast = "EC_vs_E",  add_names = TRUE, additional_title = "pST", proteins_of_interest = "EGFR")
Return_DEP_Hits_Plots(data = pST_Set2_form, dep_EC_vs_E_pST, comparison = "EC_vs_E_diff")
## 'select()' returned 1:1 mapping between keys and columns
## 'select()' returned 1:many mapping between keys and columns
## 'select()' returned 1:1 mapping between keys and columns
##                                                    pathway       pval      padj
## 1:                                  2-LTR circle formation 0.52485089 0.9721457
## 2:                               ABC transporter disorders 0.34990060 0.9508045
## 3:                  ABC-family proteins mediated transport 0.08153846 0.9508045
## 4: ADORA2B mediated anti-inflammatory cytokines production 0.42424242 0.9508045
## 5:               AKT phosphorylates targets in the cytosol 0.64855072 0.9721457
## 6:               AKT phosphorylates targets in the nucleus 0.66003976 0.9721457
##       log2err         ES        NES size             leadingEdge
## 1: 0.07627972 -0.7364706 -0.9856814    1                   11168
## 2: 0.09889030 -0.8235294 -1.1021997    1                    5684
## 3: 0.19381330  0.8000583  1.3680596    3            8714,23,5684
## 4: 0.12043337 -0.4793388 -1.0050225    4     5566,5577,5573,5576
## 5: 0.09787733 -0.3628842 -0.8224775    5 207,2932,7249,572,84335
## 6: 0.06479434 -0.6694118 -0.8959309    1                     207

## Note: Row-scaling applied for this heatmap

#data_results <- get_df_long(dep)

EBC vs EC

data_diff_EBC_vs_EC_pST <- test_diff(pST_se_Set2, type = "manual", 
                              test = c("EBC_vs_EC"))
## Tested contrasts: EBC_vs_EC
dep_EBC_vs_EC_pST <- add_rejections_SH(data_diff_EBC_vs_EC_pST, alpha = 0.05, lfc = log2(1.2))
GGPlotly_Volcano(dep_EBC_vs_EC_pST, contrast = "EBC_vs_EC",  add_names = TRUE, additional_title = "pST")
Return_DEP_Hits_Plots(data = pST_Set2_form, dep_EBC_vs_EC_pST, comparison = "EBC_vs_EC_diff")
## 'select()' returned 1:1 mapping between keys and columns
## 'select()' returned 1:many mapping between keys and columns
## 'select()' returned 1:1 mapping between keys and columns

##                                                    pathway       pval      padj
## 1:                                  2-LTR circle formation 0.53036437 0.9561553
## 2:                               ABC transporter disorders 0.86470588 0.9695444
## 3:                  ABC-family proteins mediated transport 0.94010889 0.9893691
## 4: ADORA2B mediated anti-inflammatory cytokines production 0.88908766 0.9695444
## 5:               AKT phosphorylates targets in the cytosol 0.02423715 0.7831726
## 6:               AKT phosphorylates targets in the nucleus 0.53725490 0.9561553
##       log2err         ES        NES size    leadingEdge
## 1: 0.07667469  0.7294118  0.9747650    1          11168
## 2: 0.05142649 -0.5800000 -0.7648210    1           5684
## 3: 0.04406403  0.3640985  0.5992833    3        23,5684
## 4: 0.04595381  0.3801111  0.6793965    4 5577,5566,5573
## 5: 0.35248786 -0.8081591 -1.6458118    5 84335,2932,572
## 6: 0.07436254 -0.7400000 -0.9758061    1            207
#data_results <- get_df_long(dep)

Session Info

sessionInfo()
## R version 4.2.3 (2023-03-15)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur ... 10.16
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] lubridate_1.9.2             forcats_1.0.0              
##  [3] stringr_1.5.0               dplyr_1.1.2                
##  [5] purrr_1.0.1                 readr_2.1.4                
##  [7] tidyr_1.3.0                 tibble_3.2.1               
##  [9] ggplot2_3.4.2               tidyverse_2.0.0            
## [11] mdatools_0.14.0             SummarizedExperiment_1.28.0
## [13] GenomicRanges_1.50.2        GenomeInfoDb_1.34.9        
## [15] MatrixGenerics_1.10.0       matrixStats_1.0.0          
## [17] DEP_1.20.0                  org.Hs.eg.db_3.16.0        
## [19] AnnotationDbi_1.60.2        IRanges_2.32.0             
## [21] S4Vectors_0.36.2            Biobase_2.58.0             
## [23] BiocGenerics_0.44.0         fgsea_1.24.0               
## 
## loaded via a namespace (and not attached):
##   [1] circlize_0.4.15        fastmatch_1.1-3        plyr_1.8.8            
##   [4] igraph_1.5.0.1         gmm_1.8                lazyeval_0.2.2        
##   [7] shinydashboard_0.7.2   crosstalk_1.2.0        BiocParallel_1.32.6   
##  [10] digest_0.6.33          foreach_1.5.2          htmltools_0.5.5       
##  [13] fansi_1.0.4            magrittr_2.0.3         memoise_2.0.1         
##  [16] cluster_2.1.4          doParallel_1.0.17      tzdb_0.4.0            
##  [19] limma_3.54.2           ComplexHeatmap_2.14.0  Biostrings_2.66.0     
##  [22] imputeLCMD_2.1         sandwich_3.0-2         timechange_0.2.0      
##  [25] colorspace_2.1-0       blob_1.2.4             xfun_0.39             
##  [28] crayon_1.5.2           RCurl_1.98-1.12        jsonlite_1.8.7        
##  [31] impute_1.72.3          zoo_1.8-12             iterators_1.0.14      
##  [34] glue_1.6.2             hash_2.2.6.2           gtable_0.3.3          
##  [37] zlibbioc_1.44.0        XVector_0.38.0         GetoptLong_1.0.5      
##  [40] DelayedArray_0.24.0    shape_1.4.6            scales_1.2.1          
##  [43] pheatmap_1.0.12        vsn_3.66.0             mvtnorm_1.2-2         
##  [46] DBI_1.1.3              Rcpp_1.0.11            plotrix_3.8-2         
##  [49] mzR_2.32.0             viridisLite_0.4.2      xtable_1.8-4          
##  [52] clue_0.3-64            reactome.db_1.82.0     bit_4.0.5             
##  [55] preprocessCore_1.60.2  sqldf_0.4-11           MsCoreUtils_1.10.0    
##  [58] DT_0.28                htmlwidgets_1.6.2      httr_1.4.6            
##  [61] gplots_3.1.3           RColorBrewer_1.1-3     ellipsis_0.3.2        
##  [64] farver_2.1.1           pkgconfig_2.0.3        XML_3.99-0.14         
##  [67] sass_0.4.7             utf8_1.2.3             STRINGdb_2.10.1       
##  [70] labeling_0.4.2         tidyselect_1.2.0       rlang_1.1.1           
##  [73] later_1.3.1            munsell_0.5.0          tools_4.2.3           
##  [76] cachem_1.0.8           cli_3.6.1              gsubfn_0.7            
##  [79] generics_0.1.3         RSQLite_2.3.1          fdrtool_1.2.17        
##  [82] evaluate_0.21          fastmap_1.1.1          mzID_1.36.0           
##  [85] yaml_2.3.7             knitr_1.43             bit64_4.0.5           
##  [88] caTools_1.18.2         KEGGREST_1.38.0        ncdf4_1.21            
##  [91] mime_0.12              compiler_4.2.3         rstudioapi_0.15.0     
##  [94] plotly_4.10.2          png_0.1-8              affyio_1.68.0         
##  [97] stringi_1.7.12         bslib_0.5.0            highr_0.10            
## [100] MSnbase_2.24.2         lattice_0.21-8         ProtGenerics_1.30.0   
## [103] Matrix_1.6-0           tmvtnorm_1.5           vctrs_0.6.3           
## [106] pillar_1.9.0           norm_1.0-11.1          lifecycle_1.0.3       
## [109] BiocManager_1.30.21.1  jquerylib_0.1.4        MALDIquant_1.22.1     
## [112] GlobalOptions_0.1.2    data.table_1.14.8      cowplot_1.1.1         
## [115] bitops_1.0-7           httpuv_1.6.11          R6_2.5.1              
## [118] pcaMethods_1.90.0      affy_1.76.0            promises_1.2.0.1      
## [121] KernSmooth_2.23-22     codetools_0.2-19       MASS_7.3-60           
## [124] gtools_3.9.4           assertthat_0.2.1       chron_2.3-61          
## [127] proto_1.0.0            rjson_0.2.21           withr_2.5.0           
## [130] GenomeInfoDbData_1.2.9 parallel_4.2.3         hms_1.1.3             
## [133] grid_4.2.3             rmarkdown_2.23         shiny_1.7.4.1
knitr::knit_exit()